package grisar.gris.logic;

public class SpawnLogic {

	private int startTime;
	private int endTime;
	private int spawnInterval;
	private int ticker;
	private int enemyID;
	
	public SpawnLogic(int startTime, int endTime,int spawnInterval,int enemyID){
		
		ticker = 0;
		this.startTime = startTime;
		this.endTime = endTime;
		this.spawnInterval = spawnInterval;
		this.enemyID = enemyID;
	}
	
	public void update(int ticker){
		
		this.ticker = ticker % spawnInterval;
	}
	
	public boolean isSpawning(){
		
		return ticker == 0;
	}
	
	public int getStartTime(){
		
		return startTime;
	}
	
	public int getEndTime(){
		
		return endTime;
	}
	
	public int getEnemy(){
		return enemyID;
	}

	
}
